The present invention relates generally to communications between networked computing devices and, more particularly, to a method and apparatus for remotely executing objects distributed over a network using interprocess communications that are protocol-independent and hidden to a user.
With the increasing popularity of the Internet, computer manufacturers and software developers continue to seek ways to improve how people and machines communicate with one another over a network. Certainly, as part of this effort, computer manufacturers and software developers are constantly searching for ways to increase communication speeds between computing devices connected to a network. In fact, modem speeds have increased exponentially over the past decade and continue to do so. Although hardware development is growing at a fast pace to improve network communications, software solutions also play a role in improving the overall efficiency and accuracy of information transferred over a network (e.g., the Internet). To provide a clearer understanding of how current networked devices communicate, a description of the basic Internet architecture is provided below.
A network is two or more computers connected together to allow users to communicate and share resources (e.g., databases). The Internet is essentially a wide area network (WAN) that connects a plurality of local area networks (LANs) and allows users worldwide to communicate with each other over telephone lines or other communication channels. Computers communicate over the Internet using server programs (servers) or client programs (clients). Servers are programs that provide resources while clients are programs that utilize the provided resources. Typically, Internet Service Providers (ISPs) use server computers and ISP subscribers use client computers. For example, a mail client program sends and receives messages over the Internet and allows a user to view the mail messages. A mail server program maintains an electronic mailbox that delivers mail to the mail client program.
The Internet supports the World Wide Web (WWW), which comprises many web server computers that provide information to client computers in the form of pages (i.e., web pages). To access a web page, a web client program (e.g., a browser such as Netscape Navigator) calls the appropriate web server computer to retrieve and display the web page to a user. The web client program may also call upon an auxiliary program (e.g., an applet) to, for example, display a picture, play a sound, or perform login functions. These type of programs are typically constructed using the Java(trademark) computer language and programming environment available from Sun Microsystems, Inc. of Mountain View, Calif. Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
While running on the client computer, an application process can communicate with another application process running on the server computer to obtain information or retrieve an applet. This interprocess communication is typically supported by the transmission control protocol and Internet protocol (TCP/IP). TCP controls the manner in which data is transferred between computers and other devices connected to the Internet while IP transmits the data. Interprocess communication protocols (e.g., TCP/IP sockets, remote method invocation (RMI), and common object request broker architecture (CORBA)) serve as an interface between the running client application process and the server application process in order to provide a smooth transfer of information between the two network devices. However, clients and servers are typically configured to work with only one interprocess communication protocol and are often not platform-independent.
When developing an application to run on the client side, a programmer typically writes and compiles the application, and then stores it in a memory of the client computer for later execution. Storing the application on the client computer allows for quick access and execution when run by the user. Nevertheless, certain applications may require a significant amount of memory in the client computer, thereby limiting the available storage capacity for other resident applications.
In many instances, the client computer can download the application from another computer connected to the network instead of storing the application in memory. For example, the client computer may request an applet from a server computer to generate animated pictures on a webpage. In this instance, the server computer transfers a copy of the applet code over the network for execution by the client computer. Although the client computer can download applets from virtually any computer connected to the network, the time it takes to transfer the entire applet can be significant. In addition, some applets can be fairly large (e.g., 10 MB) thus, adversely affecting the flow of traffic over the network, especially when large numbers of applets are transferred at the same time.
Therefore, current solutions for developing and transferring applications over a network can be improved to provide a more efficient use of network resources without burdening the flow of network traffic.
Based on the foregoing shortcomings, it is desirable to improve the way software applications are developed, distributed, and executed on one or more computers connected to a network without compromising computer memory limitations and network traffic flow. In addition, it is desirable to provide a framework to develop N-tier client/server applications which hide the underlying interprocess communications and are platform-independent. These features make the applications suitable for Internet-wide applications.
Once an application is developed and compiled, it is also desirable to distribute one or more components of the application to other computers connected to the network such that the distributed nature of the application is completely hidden to the programmer and user. This feature facilitates parallel processing thereby reducing storage and processing burdens on the computer running the application. In addition, storing application components in different locations over the network reduces the number of requests for the application made to any one computer. For example, a computer storing all of the application components may receive 100 requests to download copies of the application. However, if components of the application are stored on two computers connected to the network, the requests to any one computer could be reduced by half.
It is further desirable to provide a simple method for developing applications and distributing application components to remote computers (e.g., server computers) connected to the network. Such a method provides good load balancing of the application components over the network and facilitates distribution of application components based on the processing capabilities of the remote computers.
The foregoing desires are realized by developing an application using object oriented code. This type of code permits a programmer to develop an application using objects which are self-contained application components that work together. Once developed and compiled, the programmer can distribute application objects locally or remotely over a network. The address location and name of each object of the application, whether local or remote, is retained in the local computer application. Thus, while running on the local computer, the application process can request an application object from a local or remote network location using the address of the object, the name of the object, and any input values. If the requested object is not on the local computer, the computer on which the requested object resides receives the name of the object, executes the object using the input values, generates an output value of the object, and sends the output value to the requesting computer. The output value is then used in the running application. Although object execution is remote, the user of the requesting computer is given no indication of this remote operation.
As an example, a programmer wishes to develop an application that determines whether a customer can access certain account files on-line. Upon receiving the request to access the account files, the application reviews the customer""s name and personal identification number (PIN), checks this information against current records, and then generates an xe2x80x9caccess grantedxe2x80x9d or xe2x80x9caccess deniedxe2x80x9d response to the request. Initially, the programmer develops the application using an object-oriented code language so that the application can include distinct and separable objects. Once the application is developed and compiled, the programmer can then distribute an object of the application to a remote server computer while retaining an address for the distributed object. The distributed object performs the task of checking the customer""s name and PIN against current records. Subsequently, a client computer receives a customer access request and executes the application. While running, the application process sends a request to the remote server computer including the address and name of the object and well as the customer""s name and PIN as input values. The remote server executes the object using the input values, generates an output value, xe2x80x9caccess denied,xe2x80x9d and sends the output value to the client computer. The running application then generates an xe2x80x9caccess deniedxe2x80x9d response to the requesting customer.
Methods and apparatus consistent with the present invention provide the foregoing operation. Specifically, a method for executing a distributed object of a program over a network of computers comprises the steps of distributing an object of a compiled program to a remote computer connected to a local computer over a network; running the program on the local computer; sending a request for the object from the local computer to the remote computer; executing the object on the remote computer to produce an output value; and routing the output value to the local computer over the network for use in the running program.
A data processing system comprises a first computer for developing a program with a plurality of objects, the first computer having a memory configured to store the program, a compiler configured to compile the program, a communications device configured to distribute an object of the program to a remote location, and a processor configured to run the program; and a second computer in communication with the first computer over a network, the second computer having a memory configured to store an object of the program distributed to the second computer over the network, a processor configured to execute an instance of the object when requested by the first computer to generate an output value, and a communications device configured to send the output value to the first computer over the network for use in the running program.
Additional desires, features and advantages of the invention are set forth in the following description, apparent from the description, or may be learned by practicing the invention.
Both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.